using OrderingSystem.Core.Entities;

namespace OrderingSystem.Core.Interfaces
{
    public interface IConfigService
    {
        /// <summary>
        /// 获取所有配置
        /// </summary>
        Task<IEnumerable<Config>> GetConfigsAsync();

        /// <summary>
        /// 根据名称获取配置
        /// </summary>
        Task<Config> GetConfigByNameAsync(string name);

        /// <summary>
        /// 获取配置
        /// </summary>
        Task<Config> GetConfigAsync(long id);

        /// <summary>
        /// 创建配置
        /// </summary>
        Task<Config> CreateConfigAsync(Config config);

        /// <summary>
        /// 更新配置
        /// </summary>
        Task<Config> UpdateConfigAsync(Config config);

        /// <summary>
        /// 删除配置
        /// </summary>
        Task DeleteConfigAsync(long id);

        /// <summary>
        /// 分页获取配置
        /// </summary>
        Task<(IEnumerable<Config> Items, int Total)> GetConfigsPageAsync(int page, int limit, string sort = "id", string order = "desc");
    }
} 